import Head from 'next/head';
import StateOptionsTable from '../../../components/prop-tables/StateOptionsTable';
import SourceCode from '../../../components/prop-tables/StateOptionsSource';
import OptionsSwitcher from '../../../example-groups/OptionsSwitcher';

<Head>
  <title>{'State Options - Mantine React Table V2 Docs'}</title>
  <meta
    name="description"
    content="All the state options that can be used in Mantine React Table"
  />
  <meta
    property="og:title"
    content="Mantine React Table State Options API Reference"
  />
  <meta
    property="og:description"
    content="A reference of all the state options that can be used in Mantine React Table"
  />
</Head>

## State Options

<OptionsSwitcher
  links={[
    {
      label: 'Table Options',
      value: 'table-options',
    },
    {
      label: 'Column Options',
      value: 'column-options',
    },
    {
      label: 'State Options',
      value: 'state-options',
    },
  ]}
/>

> Many of the state options you can pass here are the same as the ones you can pass to the [useReactTable](https://tanstack.com/table/v8/docs/api/core/table) useTableInstance hook.

Here is a list of all the state options you can pass to `initialState` or `state`.

```jsx
const table = useMantineReactTable({
  columns,
  data,
  //note: each individual state must be mutually exclusive to `initial state` or `state`
  initialState: {
    // all the state options you can pass here
  },
  state: {
    // or here
  },
});
```

<StateOptionsTable />

<SourceCode />
